package com.example.wlt.personnel_manegement_system.Manager.Org;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;

import com.example.wlt.personnel_manegement_system.Adapter.MemberlistAdapter;
import com.example.wlt.personnel_manegement_system.Item.Item_memberlist;
import com.example.wlt.personnel_manegement_system.R;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by WLT on 2016/4/20.
 */
public class Ope_member extends Activity {
    private Button btn_back;//返回按钮
    private ListView lv_item;//申请名单
    private SimpleAdapter simp_adapter;
    private List<Map<String,Object>> datalist;//数据源
    private TextView tv_head;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.organization_operation_member);
        btn_back=(Button)findViewById(R.id.btn_org_headleft);
        tv_head=(TextView)findViewById(R.id.tv_top_head);
        tv_head.setText("成员名单");
        //返回运营部首页
        btn_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        lv_item=(ListView)findViewById(R.id.lv_member_item);
        //创建数据源
        List<Item_memberlist> Item = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            Item.add(new Item_memberlist
                    (
                            "王小芳"
                    ));
        }
        //加载适配器
        lv_item.setAdapter(new MemberlistAdapter(this, Item));
        //返回运营部首页
        btn_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
